package com.test.activemq.simple;

import java.util.Enumeration;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;

public class AsyncReceiver implements MessageListener {

	@Override
	public void onMessage(Message message) {
		
		try {
			Enumeration propNames = message.getPropertyNames();
			while(propNames.hasMoreElements()){
				Object ele = propNames.nextElement();
				System.out.println(ele);
			}
		} catch (JMSException e) {
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		AsyncReceiver receiver = new AsyncReceiver();
		
//		receiver.
	}

}
